public class Scientist extends Staff{
    private double year_end_bonus;
    public Scientist(String name, String position, double Salary, double year_end_bonus, int salMonth) {
        super(name, position, Salary, salMonth);
        this.year_end_bonus = year_end_bonus;
    }
    public double getYear_end_bonus() {
        return year_end_bonus;
    }
    public void setYear_end_bonus(double year_end_bonus) {
        this.year_end_bonus = year_end_bonus;
    }

    @Override
    public double getAllsal() {
        return super.getAllsal()+year_end_bonus;
    }

    @Override
    public String print() {
        return super.print() + "year_end_bonus: "+year_end_bonus;
    }
}
